//
// Created by Cammy on 2024/4/26.
//

#include "Stack.c"

int main() {
    Stack stack;

    StackInit(&stack);

    StackPush(&stack,1);
    StackPush(&stack,2);

    printf("%d ", StackTop(&stack));
    StackPop(&stack);

    StackPush(&stack,3);
    StackPush(&stack,4);

    printf("%d ", StackTop(&stack));
    StackPop(&stack);

    StackPush(&stack,5);

    while (!StackEmpty(&stack)){
        printf("%d ", StackTop(&stack));
        StackPop(&stack);
    }

    printf("\n");

    StackDestroy(&stack);

    return 0;
}